package com.example.bigwork.dto.request;


import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class UserUpdateRequest {
    // Username usually not updatable, or handled with care due to uniqueness
    // private String username;

    @Size(min = 8, max = 100, message = "New password must be between 8 and 100 characters if provided")
    @Pattern(regexp = "^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=!])(?=\\S+$).{8,}$",
            message = "New password must be at least 8 characters long and include at least one uppercase letter, one lowercase letter, one digit, and one special character, if provided.")
    private String newPassword; // Optional: For changing password

    @Email(message = "Email should be valid if provided")
    private String email; // Optional: For updating email
}
